home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
ffccflow
/
ffccflow.lha
/
ffccc+flow
/
ffccc
/
GETRNG.f
< prev
next >
Wrap
Text File
|
1992-07-31
|
1KB
|
36 lines
SUBROUTINE GETRNG(IST,LAST,IARR)
*-----------------------------------------------------------------------
*
* Gives positions of '(' and ')' in SSTA (no string check !)
*
* Input
* IST starting position of scan
* LAST last position of scan
*
* Output
* IARR(1) # of '(...)'
* IARR(2) pos. of first '('
* IARR(3) pos. of first ')'
* IARR(4) pos. of second '('
* etc.
*-----------------------------------------------------------------------
include 'PARAM.h'
include 'ALCAZA.h'
DIMENSION IARR(*)
N=0
IPT=IST-1
10 CONTINUE
IND=INDEX(SSTA(IPT+1:LAST),'(')
IF (IND.EQ.0) GOTO 20
IPT=IPT+IND
CALL SKIPLV(SSTA,IPT+1,LAST,.FALSE.,IND,ILEV)
IF (IND.EQ.0) GOTO 20
N=N+1
IARR(2*N)=IPT
IARR(2*N+1)=IND
IPT=IND
IF (IPT.LT.LAST) GOTO 10
20 CONTINUE
IARR(1)=N
END